Product Entitlement Customer Experience API

(0 reviews)

Use case 5 - Download artifacts (files) from within a product release example

Download all artifacts or files within a release available to you.

Before you begin

You must do the following before you begin this task:

  • Ensure you are permitted to make calls to the API by following the guidance in the Authentication topic.
  • Import the Postman collection for the API by following the instruction in the Testing topic. You have a choice of using the sandbox or production API instance when setting up the Postman collection. The sandbox API is suitable for testing.

About this task

When you find a release and want to download all the artifacts, this type of API request allows you to quickly make the download. You are likely to use this API request after finding a new entitlement or release using the iterative API requests Use case 2 and Use case 3 cover.

Alternatively, you are likely to make this request after identifying the latest release for an entitlement using the API request Use case 4 covers.

Procedure

  1. Go to the imported Postman collection in your browser.
  2. Click the arrow next to the name of your Postman collection in the left-hand menu to access a drop-down list of methods.

resources/arrow%20down-5c150111-d450-4598-a8c5-20147516e283.png

  1. Select the GET /entitlements/{id}/rights/download/releases/{releaseid}/artifact/{artifactid}/http method.
  2. Enter the entitlement id path variable VALUE. You must use an entitlement id you have access to with "rightTo": "download".
  3. Enter the releaseid path variable VALUE. You must use a releaseid that is entitled by the entitlement identified by id.
  4. Enter the artifactid path variable VALUE. You must use an artifactid that is contained within the release identified by releaseid.
  5. Click the Send button in the top right of the GET /entitlements/{id}/rights/download/releases/{releaseid}/artifact/{artifactid}/http window.

resources/Screen%20Shot%202022-05-13%20at%2016.38.10-731219bc-f6a5-48b3-be28-65dcc8073515.png

Results

The payload contains a downloadUrl which can be used to download the artifact (file). The URL is cryptographically signed for security and expires after a duration of 10 minutes.

The following is an example payload:

{
    "downloadUrl": "https://arm-prd-pkg-repository.s3.eu-west-2.amazonaws.com/parts/DS500-BN-00024-r5p0-18rel0/03527361-5e7d-4ccc-8d5f-65ec1b2a1604.16%2520Windows%252064bit?response-content-disposition=attachment%3B%20filename%3DPDH%20UAT%20-DS500-BN-00024-r5p0-18rel0%20_6.16%20Windows%2064bit&X-Amz-Security-Token=FwoGZXIvYXdzEJn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDHhNS%2BTFMHKcpAWdFCKxAas.....khwNgbb5izJ%2FnN&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20220513T151651Z&X-Amz-SignedHeaders=host&X-Amz-Expires=599&X-Amz-Credential=ASIA4YX.....0220513%2Feu-west-2%2Fs3%2Faws4_request&X-Amz-Signature=2b1c1795ffe4df......ad93ac96e3b8",
    "message": "Download Url for 8f034abb-b6d5-4f93-a1a3-2822ce419de8"
}

Next steps

Go to GET /entitlements/{id}/rights/download/releases/{releaseid}/artifact/{artifactid}/http in the endpoint SPECIFICATION section for a full description of this API call.


Reviews